import { xhrPostJson } from '@/services';
import { DynamicObjectAny } from '@/typings';

const baseUrl = '/arcv';

const api = {
  page: `${baseUrl}/arcvBox/page`,
  create: `${baseUrl}/arcvBox/create`,
  detail: `${baseUrl}/arcvBox/detail`,
  delete: `${baseUrl}/arcvBox/delete`,
  update:`${baseUrl}/arcvBox/update`,
  numberPage: `${baseUrl}/number/page`,
  archivesPage: `${baseUrl}/arcvmg/page`,
  archivesPageByBox: `${baseUrl}/arcvmg/pageByBox`,
};

// 新增
export const archivesBoxCreate = (params: DynamicObjectAny) => {
  return xhrPostJson(api.create, params);
};
// 编辑
export const archivesBoxUpdate = (params: DynamicObjectAny) => {
  return xhrPostJson(api.update, params);
};
// 删除
export const archivesBoxDelete = (params: DynamicObjectAny) => {
  return xhrPostJson(api.delete, params);
};
// 全宗分页查询
export const numberPage = (params: DynamicObjectAny) => {
    return xhrPostJson(api.numberPage, params);
};
// 案件分页
export const archivesPage = (params: DynamicObjectAny) => {
  return xhrPostJson(api.archivesPage, params);
};
// 案件分页
export const archivesPageByBox = (params: DynamicObjectAny) => {
  return xhrPostJson(api.archivesPageByBox, params);
};

export default api;
